package com.alice.item.mapper;

import com.alice.item.pojo.Item;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * Created by caoxuel on 2020/9/22 13:18
 */
public interface ItemRepository extends JpaRepository<Item,Integer>, JpaSpecificationExecutor<Item> {

    /**
     * 查询未删除的商品，删除状态为3
     * @param status
     * @return
     */
    public List<Item> findByStatusNot(Integer status);

    public List<Item> findByTitleLikeAndStatus(String title,Integer status);


}
